# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntryType do
  @moduledoc """
  Entry Type is a template for creating Entries.

  ## Attributes

  *   `authorization` (*type:* `GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntryTypeAuthorization.t`, *default:* `nil`) - Immutable. Authorization defined for this type.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the EntryType was created.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. Description of the EntryType.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. User friendly display name.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Optional. This checksum is computed by the service, and might be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. User-defined labels for the EntryType.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The relative resource name of the EntryType, of the form: projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}.
  *   `platform` (*type:* `String.t`, *default:* `nil`) - Optional. The platform that Entries of this type belongs to.
  *   `requiredAspects` (*type:* `list(GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntryTypeAspectInfo.t)`, *default:* `nil`) - AspectInfo for the entry type.
  *   `system` (*type:* `String.t`, *default:* `nil`) - Optional. The system that Entries of this type belongs to. Examples include CloudSQL, MariaDB etc
  *   `typeAliases` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Indicates the classes this Entry Type belongs to, for example, TABLE, DATABASE, MODEL.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System generated globally unique ID for the EntryType. This ID will be different if the EntryType is deleted and re-created with the same name.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the EntryType was last updated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :authorization =>
            GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntryTypeAuthorization.t() | nil,
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :etag => String.t() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :platform => String.t() | nil,
          :requiredAspects =>
            list(GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntryTypeAspectInfo.t()) | nil,
          :system => String.t() | nil,
          :typeAliases => list(String.t()) | nil,
          :uid => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:authorization,
    as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntryTypeAuthorization
  )

  field(:createTime, as: DateTime)
  field(:description)
  field(:displayName)
  field(:etag)
  field(:labels, type: :map)
  field(:name)
  field(:platform)

  field(:requiredAspects,
    as: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntryTypeAspectInfo,
    type: :list
  )

  field(:system)
  field(:typeAliases, type: :list)
  field(:uid)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntryType do
  def decode(value, options) do
    GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntryType.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataplex.V1.Model.GoogleCloudDataplexV1EntryType do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
